app.service("brandService",function ($http) {

    //1.查询所有的品牌列表
    this.findAll=()=>{
        return $http.get("../brand/list.do");
    }
    //分页带条件查询
    this.search=(pageNum,pageSize,searchEntity)=>{
        return $http.post("../brand/search.do?page="+pageNum+"&pageSize="+pageSize,searchEntity);
    }
    //添加或修改品牌
    this.addAndUpd=(url,entity)=>{
        return $http.post(url,entity);
    }
    //根据id删除品牌
    this.delete=(ids)=>{
        return $http.get("../brand/delete.do?ids="+ids);
    }
    this.findBrandList=()=>{
        return $http.get("../brand/findBrandList.do")
    }

})